﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IHISCETeim.DAL;
using IHISCETeim.Model;
using IHISCETeim.Library;
using System.Data;

namespace IHISCETeim.BLL
{
    public class UWarrantyCardExController : BaseController
    {
        public static UWarrantyCardExInfo GetByUWCID(int UWCID)
        {
            UWarrantyCardExInfo obj=  CBO.FillObject<UWarrantyCardExInfo>( UWarrantyCardExDAL.GetByUWCID(UWCID));
            if (obj == null)
                obj = new UWarrantyCardExInfo();
            return obj;
        }
        public static bool Update(UWarrantyCardExInfo obj)
        {
            return UWarrantyCardExDAL.Update(obj);
        }
        /// <summary>
        ///  根据代理商简称,获取其下所有的机器信息
        /// </summary>
        /// <param name="agentname">格式必需为  '贵住同维','河比同西'</param>
        /// <returns></returns>
        public static List<UWarrantyCardExInfo> GetByAgentName(string agentname)
        {
            return CBO.FillCollection<UWarrantyCardExInfo>( UWarrantyCardExDAL.GetByAgentName(agentname));
        }
    }
}
